function [s,plo2]=atos2(plo)
    s=zeros(3*gsize,1);
    for i=2:3*gsize
        s(i)=s(i-1)+plo(s(i-1)+1,i-1);
    end
    plo2=zeros(size(s,1)-1,1);
    for i=2:size(s,1)
        plo2(i-1)=s(i)-s(i-1);
    end
endfunction
function s=atos(plo)
    s=zeros(size(plo,1)+1,1);
    for j=1:size(plo,1)
        s(j+1)=s(j)+plo(j);
    end
endfunction
